
package com.netease.xone.fragment;

import Utils.StackTraceUtil;
import android.support.v4.app.Fragment;

import com.netease.log.NTLog;

/**
 * 工厂方法创建主界面Fragment
 *
 * @author user
 */
public class FragmentMainPagerFactory {
    private static String TAG = FragmentMainPagerFactory.class.getSimpleName();

    public static Fragment creator(int position) {
        NTLog.d(TAG, StackTraceUtil.getMethodName() + " position=" + position);
        Fragment f = null;
        switch (position) {
            case 0:
                f = new FragmentInfo();
                break;
            case 1:
                f = new FragmentSubscribe();
                break;
            case 2:
                f = FragmentSquare.newInstance();
                break;
            case 3:
                f = new FragmentMyMessage();
                break;
            case 4:
                f = new FragSettingMain();
                break;
            default:
                break;
        }

        return f;
    }
}
